package com.milk.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 优惠券
 * </p>
 *
 * @author author
 * @since 2025-03-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("coupon")
@ApiModel(value="Coupon对象", description="优惠券")
public class Coupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "优惠券类型，0表示满减券，1表示折扣券")
    private Integer couponType;

    @ApiModelProperty(value = "当优惠券类型为满减券时，表示减免的金额")
    private Double discountAmount;

    @ApiModelProperty(value = "当优惠券类型为折扣券时，表示折扣的比例")
    private Float discountRate;

    @ApiModelProperty(value = "使用最低消费金额")
    private Integer threshold;

    @ApiModelProperty(value = "总数量")
    private Long totalQuantity;

    @ApiModelProperty(value = "1表示该优惠券不能与其他优惠同时使用，0则可以叠加")
    private Integer isMutex;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "最后更新时间")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "图片低地址")
    private String  image;

    @ApiModelProperty(value = "优惠卷名字")
    private String  name;

    @ApiModelProperty(value = "有效的天数")
    private Integer validTime;

    @ApiModelProperty(value = "兑换所需积分")
    private Double integral;

    @ApiModelProperty(value = "兑换所需sdk")
    private String sdk;
}
